<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        h1 {
            text-align: center;
        }

        .dash_board {
            border-style: solid;
            border-color: black;
            height: 500px;
            width: 500px;
            position: absolute;
            margin: auto;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
        }

        .box {
            border: 1px;
            border-style: solid;
            height: 48px;
            width: 48px;
            float: left;
            text-align: center;
            line-height: 48px;
            font-size: large;
            font-weight: bolder;
        }

        .black-box {
            width: 46px;
            height: 46px;
            border: 2px aliceblue;
            background: black;
        }

        .mine {
            height: 30px;
            width: 30px;
            border-radius: 15px;
            background: red;
            display: inline-block;
            vertical-align: middle;
        }

        .reset {
            top: 100px;
            left: 0;
            right: 0;
            margin: auto;
            height: 60px;
            width: 60px;
            position: absolute;
            border-radius: 30px;
            background: green;
            line-height: 60px;
            display: inline-block;
            text-align: center;
            vertical-align: middle;
            font-size: large;
            font-weight: bolder;
        }

    </style>
</head>
<body>
<div class="reset">重来</div>
<div class="dash_board">

</div>
<script type="text/javascript" src="https://code.jquery.com/jquery-3.3.1.min.js"></script>
<script type="text/javascript">

    var initMineArea = function (id) {
        $.get("dashboard/data/" + id, function (data) {
            var dash_board = $(".dash_board");
            dash_board.text("")
            dash_board.append(data);
            active_click();
        });
    };

    var reset = function () {
        $.post("dashboard/reset", function () {
            initMineArea(-1);
        })

    }

    $(".reset").click(function () {
        reset();
    });

    var active_click = function () {
        $(".unboxing").click(function () {
            var id = $(this).attr("id");
            initMineArea(id);
        })
    }

    initMineArea(-1);

</script>
</body>
</html>